package com.hwadee.springboot.controller.StudentController;

import com.hwadee.springboot.entity.R;
import com.hwadee.springboot.entity.Student;
import com.hwadee.springboot.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StudentController {
    @Autowired
    private StudentService studentService;

    @GetMapping("/teacher/ClassInfo/updateStudent")
    public R updateStudent(@RequestBody Student student) {return studentService.updateStudent(student);}

    @GetMapping("/teacher/ClassInfo/deleteStudent")
    public R deleteStudent(@RequestBody int studentId) {return studentService.deleteStudent(studentId);}

}
